package com.hs.security.utils;

/**
 * @ClassName Constant
 * @Description 常量
 */
public enum Constant {
    /**
     *  请求成功
     */
    SUCCESS(200,"请求成功"),
    CREATED(201,"创建成功"),
    DELETED(204,"删除成功"),
    UPDATE(203,"修改成功"),
    UNAUTHORIZED(401,"未授权,请先登录"),
    FORBIDDEN(403,"权限不足，禁止访问"),
    ERR(430,"请求失败"),
    CREATED_ERR(431,"添加失败"),
    DELETED_ERR(432,"删除失败"),
    UPDATE_ERR(433,"更新失败");
    private final Integer code;
    private final String msg;

    Constant(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
